import request from '@/utils/request'

// 查询预约来访列表
export function listVisit(query) {
    return request({
        url: '/visit/visit/list',
        method: 'get',
        params: query
    })
}

// 查询预约来访详细
export function getVisit(id) {
    return request({
        url: '/visit/visit/' + id,
        method: 'get'
    })
}

// 新增预约来访
export function addVisit(data) {
    return request({
        url: '/visit/visit',
        method: 'post',
        data: data
    })
}
//审批
export function audit(data) {
    return request({
        url: '/visit/visit/audit',
        method: 'post',
        data: data
    })
}
// 修改预约来访
export function updateVisit(data) {
    return request({
        url: '/visit/visit',
        method: 'put',
        data: data
    })
}

// 删除预约来访
export function delVisit(id) {
    return request({
        url: '/visit/visit/' + id,
        method: 'delete'
    })
}

// 查询权限区域
export function getVisitArea(id) {
    return request({
        url: '/visitArea/visitArea/listAll',
        method: 'get'
    })
}